<HTML><HEAD><TITLE>not +Goal</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Control</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>not +Goal</H1>
Succeeds if Goal cannot be satisfied (uses negation as failure).


<DL>
<DT><EM>Goal</EM></DT>
<DD>Atom or compound term.
</DD>
</DL>
<H2>Description</H2>
   Used to fail if Goal succeeds.  Uses the standard Prolog form of
   negation as failure.

<P>
   To check whether a call Goal succeeds without binding variables, the
   call not not Goal can be used.  Note that !/0 does not cut through
   not/1.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>not(+) is semidet
</UL>
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
Fails if Goal succeeds
<H2>Examples</H2>
<PRE>
Success:
      not fail .
      not 1 == 2 .
      not X==1 .
      not not X = 1.
          % does not bind X
Fail:
      not(X=1).
      not(true).
      not(3 == 3).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/control/RP-1.html">\+ / 1</A>, <A HREF="../../kernel/control/T-1.html">~ / 1</A>, <A HREF="../../kernel/control/-G-2.html">-> / 2</A>
</BODY></HTML>
